package com.lytest.cloud.controller;

import com.lytest.cloud.service.PaymentFeignService;
import com.lytest.springcloud.entities.CommonResult;
import com.lytest.springcloud.entities.Payment;
import lombok.extern.log4j.Log4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Log4j
public class OrderfeighController {
    @Resource
    private PaymentFeignService paymentFeignService;
    @GetMapping(value = "/consumer/payment/get/{id}")
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id){
        log.info(paymentFeignService.getPaymentById(id));
        return paymentFeignService.getPaymentById(id);
    }

}
